package Publics;

import java.io.Serializable;

public class ResponseResUlt<T> implements Serializable {
    private long count;

    private T data;

    private int code;

    private String msg;

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public ResponseResUlt(long count, T data, int code, String msg) {
        this.count = count;
        this.data = data;
        this.code = code;
        this.msg = msg;
    }

    public ResponseResUlt(long count, T data) {
        this.count = count;
        this.data = data;
        this.code = 0;
        this.msg = "";
    }

    public ResponseResUlt(T data) {
        this.data = data;
        this.code = 0;
        this.msg = "";
    }

    public ResponseResUlt(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static ResponseResUlt createSuccessResUle(){
        return new ResponseResUlt(0,"");
    }
}
